/*
 * @Description: 文件查看
 * @Version: V1.0.0
 * @Author: 黄鑫
 * @Date: 2025-05-15
 * @LastEditors: 黄鑫
 * @LastEditTime: 2025-05-15
 * @FilePath: FileWebViewPage.dart
 * @Remarks: 
 */
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';

class FileWebViewPage extends StatelessWidget {
  String? title;
  String fileUrl;
  FileWebViewPage(this.fileUrl, {super.key, this.title});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title ?? ""),
      ),
      body: InAppWebView(
        initialUrlRequest: URLRequest(url: WebUri(fileUrl)),
        onProgressChanged: (InAppWebViewController controller, int progress) {},
      ),
    );
  }
}
